window.onload = function(){
    initParentIframeHeight('content-iframe');
    addResizeListener(document.getElementsByTagName("body")[0], detectCallback);
}

var detectCallback = function() {
  setParentIframeHeight('content-iframe');
};

function setParentIframeHeight(id){
    var parentIframe = parent.document.getElementById(id);
    sHeight = document.body.scrollHeight
    console.log(sHeight)
    parentIframe.style.height = sHeight + 'px'
}

function initParentIframeHeight(id) {

}

detectCallback();